package com.hxzy.service.impl;


import com.hxzy.entity.SmsHomeAdvertise;
import com.hxzy.mapper.SmsHomeAdvertiseMapper;
import com.hxzy.service.SmsHomeAdvertiseService;
import com.hxzy.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

public class SmsHomeAdvertiseServiceImpl implements SmsHomeAdvertiseService {
    @Override
    public SmsHomeAdvertise selectByPrimaryKey(Long id) {
        SmsHomeAdvertise advertise=null;
        try(SqlSession session= MybatisUtil.getSqlSessionFactory().openSession()) {
            SmsHomeAdvertiseMapper mapper = session.getMapper(SmsHomeAdvertiseMapper.class);
            advertise=mapper.selectByPrimaryKey(id);
        }

        return advertise;
    }
}
